package com.example.demo2_review.design_pattern.behavioral_patterns.observer_pattern;

/**
 * @Author zwp14
 * @create 2024/6/25 1:03
 * @description 具体观察者2号
 */
public class OctalObserver extends Observer {

    public OctalObserver(Subject subject) {
        this.subject = subject;
        this.subject.addObservers(this);
    }

    @Override
    public void update() {
        System.out.println("Octal String: " + Integer.toBinaryString(subject.getState()));
    }
}
